Sounds like an issue with offsets (fixture, global G92, or Tool).
I assume you are using KmotionCNC? What Version?
Maybe the Application/GCode Interpreter is configured to start up with an offset enabled (Settings file - which also controls the initial inches/mm mode) and then the end of the GCode turns the offset.
To diagnose the problem view the Machine Coordinates vs GCode Coordinates by toggling the Machine Coord checkbox on and off. If there is a difference you have an offset selected. Select the edit buttons near the fixture offset and tool selector drop downs. See also:
http://dynomotion.com/Help/KMotionCNC/GCodeOffsets.htm
HTH
Regards
TK
Tom,
Something strange is happening with my X axis. After a cold start up and running the first program of the day, the X DRO says 1.0000 when the program finishes. The last move instruction in the Gcode says X 0.0000 Y 0.0000 Z 2.0000. The Y says 0.0000 and Z DRO says 2.0000. The physical position of the bit is at X 0.0000, Y 0.0000 and Z 2.0000. If I don't reset the X DRO to zero the next program will run 1" shifted to the right. Once I reset the DRO I don't have this problem again for the rest of the day unless I do a cold restart. I thought that maybe one of my C programs might be causing a problem so I only ran the Init, manually jogged the machine to a safe position, zeroed the 3 DRO's manually and ran a short program. Same problem, the X DRO says 1.0000 when the first program finishes. I don't know if this has anything to do with it but when I turn the Kflop on and then open Kmotion CNC the X DRO says -1.0000 while the Y and Z say 0.0000. I think this problem started around the time that I changed the default units to inches.
Any suggestions?